package com.jx.springcloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class configMain9100 {
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(configMain9100.class, args);
        String userName = applicationContext.getEnvironment().getProperty("user.name");
        String userAge = applicationContext.getEnvironment().getProperty("user.age");
        //获取当前部署的环境
   //     String currentEnv = applicationContext.getEnvironment().getProperty("current.env");
        System.err.println("in "+"user name :" + userName + "; age: " + userAge);
    }
}
